import request from '@/utils/request'

// export function getList(data) {
//   return request({
//     url: 'http://localhost:8080/dzmhisdepartments/select',
//     method: 'get',
//     params:data
//   })
// }
export function getList(departmentName) {
  return request({
    url: `http://localhost:8080/dzmhisdepartments/select`,
    method: 'get',
    params:{
      departmentName
    }
  })
}




// 删除数据
export function delatedata(did){
    return request({
      url:'http://localhost:8080/dzmhisdepartments/deletes/'+did,
      method:'delete'
    })
}

// 新增数据
export function insertdata(data){
  return request({
    url:`http://localhost:8080/dzmhisdepartments/insert`,
    method:'post',
    data
  })
}


//修改数据
export function updatedata(data){
  return request({
    url:"http://localhost:8080/dzmhisdepartments/updates",
    method:"post",
    data
  })
}
